//为种类添加专家
function showNewWindow_score(id){
	var Url = 'web/workflow/scoreDetails.jsp?id='+id;
	var dialog = "dialogWidth:600px;dialogHeight:450px;help:no;scroll:yes;center:yes;status:no;";
	var ret = window.showModalDialog(Url,window,dialog);
//	将返回的字符串分割
	if(ret!=""){
		var str = ret.split("<;>");
		if(str.length==2){
			$("#"+id).val(str[0]);
			 $.ajax({
					type : 'post',
					url : 'postScoreAction.action',
					dataType : 'json',
					data :"artId="+id+"&score="+str[0]+"&opinions="+str[1],
					success : function(msg){
						if(msg.state=="success"){
							$("#state"+id).html("<font color='green'>成功</font>");
						}else if(msg.state=="error"){
							$("#state"+id).html("<font color='red'>失败</font>");
						}else {
							alert("用户未注册");
						}
					}
				});
		}
	}
}
function ok(){
	
//	获得各项的分数和意见
	var score_1 = $("#score_1").val();
	var opinions_1 = $("#opinions_1").val();
	var score_2 = $("#score_2").val();
	var opinions_2 = $("#opinions_2").val();	
	var score_3 = $("#score_3").val();
	var opinions_3 = $("#opinions_3").val();
	var score_4 = $("#score_4").val();
	var opinions_4 = $("#opinions_4").val();
	var score_5 = $("#score_5").val();
	var opinions_5 = $("#opinions_5").val();
	if(score_1==""||score_2==""||score_3==""||score_4==""||score_5==""){
		ymPrompt.alert({message:'请输入各项的分数',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
	if(score_1>100||score_1<0){
		ymPrompt.alert({message:'请输入0-100的分数',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
	if(score_2>100||score_2<0){
		ymPrompt.alert({message:'请输入0-100的分数',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
	if(score_3>100||score_3<0){
		ymPrompt.alert({message:'请输入0-100的分数',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
	if(score_4>100||score_4<0){
		ymPrompt.alert({message:'请输入0-100的分数',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
	if(score_5>100||score_5<0){
		ymPrompt.alert({message:'请输入0-100的分数',title:'系统提示',showMask:true,maskAlphaColor:'#ffffff',maskAlpha:'0',width:200,height:120});
		return;
	}
	var ret = score_1+"<S>"+opinions_1+"<O>"+score_2+"<S>"+opinions_2+"<O>"+score_3+"<S>"+opinions_3+"<O>"+score_4+"<S>"+opinions_4+"<O>"+score_5+"<S>"+opinions_5;
	var totalScore = Number(score_1)+Number(score_2)+Number(score_3)+Number(score_4)+Number(score_5);
	var averageScore = totalScore/5;
	window.returnValue = averageScore+"<;>"+ret;
	window.close();
}
